import {createRouter,createWebHistory,RouteRecordRaw} from 'vue-router'
import Home from '../view/Home/index.vue'
const routes:RouteRecordRaw[] = [
    {
        path: "/",
        name: "home",
        components: {
            default: Home,
        },
        meta: {
            title: "首页",
            hidden: false,
        },
    },
    {
        path: '/classification',
        name: 'classification',
        components: {
            default: () => import('../view/Classification/index.vue')
        },
        meta: {
            title: '分类',
            hidden: false
        }
    },
    {
        path: '/chart',
        name: 'chart',
        components: {
            default: () => import('../view/Chart/index.vue')
        },
        meta: {
            title: '图搜',
            hidden: false
        }
    },
    {
        path: '/shopping',
        name: 'shopping',
        components: {
            default: () => import('../view/Shopping/index.vue')
        },
        meta: {
            title: '购物袋',
            hidden: false
        }
    },
    {
        path: '/My',
        name: 'My',
        components: {
            default: () => import('../view/My/index.vue')
        },
        meta: {
            title: '我的',
            hidden: false
        }
    },
    {
        path: '/Topic/',
        name: 'Topic',
        components: {
            default: () => import('../view/Topic/index.vue')
        },
        meta: {
            title: '登录',
            hidden: true
        }
    },
    {
        path: '/register',
        name: 'resgister',
        components: {
            default: () => import('../view/register/index.vue')
        },
        meta: {
            title: '注册',
            hidden: true
        }
    },
    {
        path: '/topic',
        name: 'topic',
        components: {
            default: () => import('../view/topic/index.vue')
        },
        meta: {
            title: '商品详情',
            hidden: true
        }

    },
    {
        path: '/right',
        name: 'right',
        components: {
            default: () => import('../view/right/index.vue')
        },
        meta: {
            title: '权限',
            hidden: true
        }

    },
    // {
    //     path: "/search",
    //     name: "search",
    //     components: {
    //         default: () => import('../view/search/index.vue')
    //     },
    //     meta: {
    //         title: '搜索',
    //         hidden: true
    //     }
    // },
    {
        path: '/list',
        name: 'list',
        components: {
            default: () => import('../view/list/index.vue')
        },
        meta: {
            title: '列表',
            hidden: true,
            icon:'paid'
        }
    }
  
]


const router =createRouter({
    history:createWebHistory(),
    routes,
})
export default router